package com.cxy.datawarehouse.biz;

import com.cxy.datawarehouse.entity.Element;
import com.cxy.datawarehouse.service.ElementService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;
import java.util.List;

@Component
@Slf4j
public class ElementBiz {
    @Resource
    ElementService elementService;

    public List<Element> list(){
        return elementService.list();
    }

    public List<Element> getByTypeId(Long id){
        return elementService.getByTypeId(id);
    }

    public void create(Element element){
        elementService.create(element);
    }

    public void update(Element element){
        elementService.update(element);
    }

    public void deleteById(Long id){
        elementService.deleteById(id);
    }
}
